home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr33 / timset72.zip / IF2DAY.ZIP / IF2.DOC next >
Text File  |  1991-01-27  |  3KB  |  80 lines

  1.  
  2.                           IF2DAY
  3.                        Batch Enhancer
  4.                         Gary Miller
  5.                         72657,3010
  6.                          1/20/91
  7.  
  8.      While wandering through one of my BAT files I realized that there
  9.  are processes that need not be run every day but I did rather than never
  10.  run them at all. Yet another program appeared recently that I'd like
  11.  to occasionally use and that started this effort.
  12.      The key thought here is a batch process to be run only on certain
  13.  days of the month. Thus in your AUTOEXEC.BAT you could:
  14.  
  15.                @ECHO OFF
  16.                REM if today's date is the 4th or 24th of the month
  17.                IF2DAY is_4 or_24 run ECHO  Remember to do backup today !!
  18.                IF ERRORLEVEL 1 PAUSE
  19.  
  20.   or in the case of periodic cleanups:
  21.  
  22.                REM  Cleanup files every Tuesday
  23.                IF2DAY is_Tuesday run CHKDSK
  24.        or
  25.                REM every other morning empty the bit bucket
  26.                IF2DAY is_Odd and_Am run ERASE C:\BIT\BUCKET\*.*
  27.  
  28.      The options "is_", "and_", "or_" and " run " must be in lower
  29.  case letters and the Day of the week (Sunday Friday), "Odd" and "Even"
  30.  must start in capital letters but only the first letter should be
  31.  capitalized. You can also use "Am" or "Pm" with "is_","and_" and "or_".
  32.  Finally, you can set a time limit
  33.  
  34.                REM Check for disk fragmentation Monday morning
  35.                IF2DAY is_Monday aft_09:30 B4_11:00 run CHKFRAG
  36.  
  37.  using either "B4_HH:MM" and/or "aft_HH:MM".
  38.  
  39.      IF2DAY will execute a COM, EXE or BAT file with appropriate command
  40.  line options or no options if none are required.  It will also execute
  41.  the standard DOS commands.  IF2DAY accomplishes this by loading a
  42.  secondary copy of the transient portion of COMMAND.COM and a copy of
  43.  the environment.  Because it is transient the COM, EXE, or BAT file you
  44.  run should leave nothing behind them in memory or alter the
  45.  environment.  You should not use it to load any TSR's or execute the
  46.  SET, PROMPT or PATH commands which alter the environment.
  47.  
  48.  
  49.      If IF2DAY.COM
  50.               cannot validate the command line it will signal an error
  51.                    and return ERRORLEVEL=0, for failure.
  52.  
  53.               finds NONE of the conditions true, it will return
  54.                    ERRORLEVEL=0, for failure.
  55.  
  56.               is given just the desired conditions that are true and no
  57.                    "run" instruction, it will quietly return
  58.                    ERRORLEVEL=1, for success.
  59.  
  60.  
  61.          Gary Miller
  62.  
  63.  
  64.      And now a word from the lawyers:
  65.  
  66.      Copyright (c) 1991 Gary R. Miller .  All Rights Reserved.
  67.    
  68.  You are free to use, copy and distribute IF2DAY providing that:
  69.  
  70.      NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.
  71.    
  72.      IT IS NOT MODIFIED IN ANY WAY.
  73.    
  74.      THIS DOCUMENTATION FILE (UNMODIFIED) ACCOMPANIES ALL COPIES.
  75.    
  76.  This program is provided AS IS without any warranty, expressed or
  77.  implied, including but not limited to fitness for a particular purpose.
  78.  
  79.  
  80.